<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<link href="assets/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="assets/app/application.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
	function reflushImageCode() {
		document.getElementById("code").src="Kaptcha.jpg?t="+new Date().valueOf();
	}
</script>
</head>
<body>
	<%@ include file="index_head.jsp" %>
<!--   主要内容   -->
<div class="container">
	<div id="reg_form">
        <form class="form-horizontal" action="regist.do?m=registForm" method="post">
            <fieldset >
            <!-- 账号名和电话加上正则匹配【用js】 -->
                <legend style="margin-top:3px;">新用户注册</legend>
                
                 <div class="control-group ${(empty nikename)?'':'error'}">
                    <label class="control-label" for="inputName">用户名</label>
                    <div class="controls">
                        <input name="nikename" type="text" id="inputName" placeholder="用户名" required>
                        <span class="help-inline">${nikename}</span>
                    </div>
                </div>
                
                <div class="control-group ${(empty account)?'':'error'}">
                     <label class="control-label" for="inputEmail">账号</label>
		        	 <div class="controls">
		          		<input name="account" class="invalid" type="email" id="inputEmail" placeholder="账号Email" required>
		          		<span class="help-inline">${account}</span>
		        	</div>
                </div>
                
                <div class="control-group ${(empty password)?'':'error'}">
                    <label class="control-label" for="inputPassword">请设置密码</label>
                    <div class="controls">
                        <input name="password" type="password" id="inputPassword" placeholder="请设置密码" required>
                        <span class="help-inline">${password}</span>
                    </div>
                </div>
                
                 <div class="control-group ${(empty passwordConfirm)?'':'error'}">
                    <label class="control-label" for="inputPasswordConfirm">请确认</label>
                    <div class="controls">
                        <input name="passwordConfirm" type="password" id="inputPasswordConfirm"  placeholder="请确认密码" required>
                        <span class="help-inline">${passwordConfirm}</span>
                    </div>
                </div>
                
                <div class="control-group ${(empty phone)?'':'error'}">
                    <label class="control-label" for="phone">电话</label>
                    <div class="controls">
                        <input name="phone" type="text" id="phone" placeholder="电话" required>
                        <span class="help-inline">${phone}</span>
                    </div>
                </div>
                
                <div class="control-group ${(empty code)?'':'error'}">
                    <label class="control-label" for="inputPassword">验证码</label>
                    <div class="controls">
                        <input name="inputPassword" class="span1" type="text" id="inputPassword" required>
                        <img id="code" src="Kaptcha.jpg" style="max-width: 17%;"/>
                        <span class="help-inline">
                        		<a href="javascript:reflushImageCode()">重来一张</a>
                        </span>
                        <span class="help-inline">${code}</span>
               
                    </div>
                </div>
                
                <button type="submit" class="offset2 btn btn-primary btn-large span3">立即注册</button>
               
            </fieldset>
        </form>
    </div>
</div>
<!--   页脚   -->
	<%@ include file="index_footer.jsp" %>
<script language="javascript" src="assets/bootstrap/js/jquery-1.9.1.js"></script> 
<script language="javascript" src="assets/bootstrap/js/bootstrap.js"></script>
<script language="javascript" src="assets/bootstrap/js/jquery.min.js"></script>
</body>
</html>
